/*
 * DOMExceptionPtr.h
 *
 *  Created on: Apr 18, 2009
 *      Author: wrice
 */

#ifndef DOMEXCEPTION_H_
#define DOMEXCEPTION_H_

#include "DOMCore.h"
namespace DOMCore {

class DOMException {
	// http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html
public:
	virtual unsigned short   getCode() = 0;

	// ExceptionCode
	static const unsigned short      INDEX_SIZE_ERR                 = 1;
	static const unsigned short      DOMSTRING_SIZE_ERR             = 2;
	static const unsigned short      HIERARCHY_REQUEST_ERR          = 3;
	static const unsigned short      WRONG_DOCUMENT_ERR             = 4;
	static const unsigned short      INVALID_CHARACTER_ERR          = 5;
	static const unsigned short      NO_DATA_ALLOWED_ERR            = 6;
	static const unsigned short      NO_MODIFICATION_ALLOWED_ERR    = 7;
	static const unsigned short      NOT_FOUND_ERR                  = 8;
	static const unsigned short      NOT_SUPPORTED_ERR              = 9;
	static const unsigned short      INUSE_ATTRIBUTE_ERR            = 10;
	static const unsigned short      INVALID_STATE_ERR              = 11;
	static const unsigned short      SYNTAX_ERR                     = 12;
	static const unsigned short      INVALID_MODIFICATION_ERR       = 13;
	static const unsigned short      NAMESPACE_ERR                  = 14;
	static const unsigned short      INVALID_ACCESS_ERR             = 15;

public:	virtual ~DOMException() {}
};

}

#endif /* DOMEXCEPTION_H_ */
